package com.lianjia.sh.se.message.event.client.util;

import org.apache.commons.lang3.StringUtils;
import org.springframework.util.Assert;

/**
 * Created by yangsp1 on 16/8/3.
 */
public abstract class TopicUtil {
    /**
     * 计算主题
     * @param projectCode
     * @param serviceCode
     * @return
     */
    public static String populateTopic(String projectCode,String serviceCode){
        Assert.isTrue(StringUtils.isNotBlank(projectCode),"项目编码不能为空");
        Assert.isTrue(StringUtils.isNotBlank(serviceCode),"服务编码不能为空");
        return projectCode + "." + serviceCode;
    }
}
